<div class="download-executable-modal-form">
  <div class="modal-header">
    <button type="button" class="close" ng-click="cancel()">
      <span aria-hidden="true">&times;</span>
      <span class="sr-only">Close</span>
    </button>

    <h3 class="modal-title" ng-if="!downloaded" translate="home.header.downloadExecutable">Download Edge Executable</h3>

    <h3 class="modal-title" ng-if="downloaded" translate="global.form.quickTips">Quick Tips</h3>

  </div>
  <div class="modal-body">
    <ng-include src="'app/home/alerts/error/errorAlert.tpl.html'"></ng-include>

    <div ng-if="!downloaded">
      <div class="form-group">
        <label class="control-label" translate="global.form.os">OS</label>
        <select class="form-control"
                name="density"
                ng-model="downloadModel.selectedEdgeOs">
          <option value="{{pipelineConstant.DARWIN_OS}}"
                  ng-selected="downloadModel.selectedEdgeOs === pipelineConstant.DARWIN_OS">Darwin (Mac OS)</option>
          <option value="{{pipelineConstant.LINUX_OS}}"
                  ng-selected="downloadModel.selectedEdgeOs === pipelineConstant.LINUX_OS">Linux</option>
          <option value="{{pipelineConstant.WINDOWS_OS}}"
                  ng-selected="downloadModel.selectedEdgeOs === pipelineConstant.WINDOWS_OS">Windows</option>
        </select>
      </div>
      <div class="form-group">
        <label class="control-label" translate="global.form.architecture">Architecture</label>
        <select class="form-control"
                name="density"
                ng-model="downloadModel.selectedEdgeArch">
          <option value="{{pipelineConstant.AMD64_ARCH}}"
                  ng-selected="downloadModel.selectedEdgeArch === pipelineConstant.AMD64_ARCH">AMD64</option>
          <option value="{{pipelineConstant.ARM_ARCH}}"
                  ng-selected="downloadModel.selectedEdgeArch === pipelineConstant.ARM_ARCH">ARM</option>
        </select>
      </div>
    </div>

    <div ng-if="downloaded">
      <div class="stepper">
        <div class="step cursor-pointer">
          <div>
            <div class="title">1. Extract the downloaded tar file</div>
            <div class="body">
              <pre>tar -xvf streamsets-datacollector-edge*.tgz</pre>
            </div>
          </div>
        </div>
        <div class="step cursor-pointer">
          <div>
            <div class="title">2. Start SDC Edge and an Edge Pipeline</div>
            <div class="body">
              <pre>
cd streamsets-datacollector-edge
bin/edge --start={{pipelineConfig.pipelineId}}
              </pre>
            </div>
          </div>
        </div>
        <div class="step cursor-pointer">
          <div>
            <div class="title">3. Use REST APIs to manage edge pipelines</div>
            <div class="body">
              <pre>
### List all pipelines
    curl -X GET http://localhost:18633/rest/v1/pipelines

### Start Pipeline
    curl -X POST http://localhost:18633/rest/v1/pipeline/{{pipelineConfig.pipelineId}}/start

### Check Pipeline Status
    curl -X GET http://localhost:18633/rest/v1/pipeline/{{pipelineConfig.pipelineId}}/status

### Check Pipeline Metrics
    curl -X GET http://localhost:18633/rest/v1/pipeline/{{pipelineConfig.pipelineId}}/metrics

### Stop Pipeline
    curl -X POST http://localhost:18633/rest/v1/pipeline/{{pipelineConfig.pipelineId}}/stop

### Reset Origin Offset
    curl -X POST http://localhost:18633/rest/v1/pipeline/{{pipelineConfig.pipelineId}}/resetOffset
              </pre>
            </div>
          </div>
        </div>
    </div>

  </div>
  <div class="modal-footer">
    <button type="button"
            ng-if="!downloaded"
            class="btn btn-default"
            ng-click="cancel()"
            translate="global.form.cancel">Cancel</button>
    <button type="button"
            ng-if="!downloaded"
            class="btn btn-primary"
            ng-click="download()"
            translate="global.form.download">Download</button>
    <button type="button"
            ng-if="downloaded"
            class="btn btn-primary"
            ng-click="done()"
            translate="global.form.done">Done</button>
  </div>
</div>
